package com.tabjin.rfidsocket.pojo;

import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Getter
@Setter
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "arch_card")
public class ArchCard {
    /**
     * 卡号
     */
    @Id
    private Integer id;

    /**
     * 项目id
     */
    @Column(name = "project_id")
    private Integer projectId;

    /**
     * 楼栋id
     */
    @Column(name = "building_id")
    private Integer buildingId;

    /**
     * 房屋id
     */
    @Column(name = "house_id")
    private Integer houseId;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * NFC/IC卡号
     */
    @Column(name = "card_code")
    private String cardCode;

    /**
     * 有效期起始（门禁）
     */
    @Column(name = "access_available_start_time")
    private Date accessAvailableStartTime;

    /**
     * 有效期结束（门禁）
     */
    @Column(name = "access_available_end_time")
    private Date accessAvailableEndTime;

    /**
     * 有效期起始（梯控）
     */
    @Column(name = "elevator_available_start_time")
    private Date elevatorAvailableStartTime;

    /**
     * 有效期结束（梯控）
     */
    @Column(name = "elevator_available_end_time")
    private Date elevatorAvailableEndTime;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 卡类型
     */
    private Integer type;

    /**
     * 授权电梯楼层
     */
    @Column(name = "available_floor")
    private String availableFloor;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 最后一次修改时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 删除时间
     */
    @Column(name = "delete_time")
    private Date deleteTime;

    /**
     * 操作者
     */
    private String operator;

    /**
     * 最后一次更新操作者的ip地址
     */
    @Column(name = "operator_ip")
    private String operatorIp;
}